USE [Smart]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_exercise_ExerciseCategory1]') AND parent_object_id = OBJECT_ID(N'[dbo].[Exercise]'))
ALTER TABLE [dbo].[Exercise] DROP CONSTRAINT [FK_exercise_ExerciseCategory1]
GO

USE [Smart]
GO

/****** Object:  Table [dbo].[Exercise]    Script Date: 06/02/2012 23:12:38 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Exercise]') AND type in (N'U'))
DROP TABLE [dbo].[Exercise]
GO

USE [Smart]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ExerciseLog_exercise]') AND parent_object_id = OBJECT_ID(N'[dbo].[ExerciseLog]'))
ALTER TABLE [dbo].[ExerciseLog] DROP CONSTRAINT [FK_ExerciseLog_exercise]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ExerciseLog_User]') AND parent_object_id = OBJECT_ID(N'[dbo].[ExerciseLog]'))
ALTER TABLE [dbo].[ExerciseLog] DROP CONSTRAINT [FK_ExerciseLog_User]
GO

IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__ExerciseL__Exerc__07F6335A]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[ExerciseLog] DROP CONSTRAINT [DF__ExerciseL__Exerc__07F6335A]
END

GO

USE [Smart]
GO

/****** Object:  Table [dbo].[ExerciseLog]    Script Date: 06/02/2012 23:12:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ExerciseLog]') AND type in (N'U'))
DROP TABLE [dbo].[ExerciseLog]
GO

USE [Smart]
GO

/****** Object:  Table [dbo].[ExerciseCategory]    Script Date: 06/02/2012 23:12:48 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ExerciseCategory]') AND type in (N'U'))
DROP TABLE [dbo].[ExerciseCategory]
GO